import React, { memo } from 'react'
import { EntireWrapper } from './style'
import EntireHeader from './entire-header'
import EntireList from './entire-list'
import { useParams } from 'react-router-dom'
import EntirePagination from './entire-pagination'
import useFixedHeader from '@/hooks/useFixedHeader'

const Entire = memo(() => {
  const {type} = useParams()
  const size = 30
  // 使用fixed导航栏
  useFixedHeader(true)
  return (
    <EntireWrapper>
      <EntireHeader/>
      <EntireList size={size} type={type}/>
      <EntirePagination size={size}/>
    </EntireWrapper>
  )
})

export default Entire